home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
var
/
lib
/
dpkg
/
info
/
dash.prerm
< prev
next >
Wrap
Text File
|
2008-06-20
|
616b
|
35 lines
#!/bin/sh
#
# pre-removal script for the Debian GNU/Linux ash package
#
# $Id: dash.prerm,v 1.2 2003/09/03 10:42:08 herbert Exp $
set -e
remove_divert() {
div=$(dpkg-divert --list $1)
if [ -n "$div" ] && [ -z "${div%%*by dash}" ]; then
distrib=${div% by dash}
distrib=${distrib##* to }
mv $distrib $1
dpkg-divert --remove $1
fi
}
remove_shell() {
if ! type remove-shell > /dev/null 2>&1; then
return
fi
remove-shell /bin/dash
}
if [ "$1" = remove ] || [ "$1" = deconfigure ]; then
remove_divert /bin/sh
remove_divert /usr/share/man/man1/sh.1.gz
fi
if [ "$1" = remove ]; then
remove_shell
fi